<?php 
//将用户全部绑定到群组
$talkid = $_GET['talkid'];

$arrUser = $db->fetch_all_assoc("select userid from ".dbprefix."user order by userid desc");

foreach($arrUser as $item){
	$talkusernum = $db->once_num_rows("select * from ".dbprefix."talk_users where  userid='".$item['userid']."' and talkid='".$talkid."'");
	
	if($talkusernum == '0'){
		$db->query("insert into ".dbprefix."talk_users (`userid`,`talkid`,`addtime`) values ('".$item['userid']."','".$talkid."','".time()."')");
	}
	
}

$userNum = $db->once_num_rows("select * from ".dbprefix."talk_users where talkid='".$talkid."'");

$db->query("update ".dbprefix."talk set `count_user`='".$userNum."' where talkid='".$talkid."'");

qiMsg("会员投送成功！");